﻿using System;
using System.Web.Configuration;

namespace AspSQLProvider
{
    public class PgCore
    {
        public static string GetShemaTable(string TableName)
        {
            string _shema = string.Empty;

            _shema = WebConfigurationManager.AppSettings["ShemaAspSQLProvider"];

            if (!string.IsNullOrEmpty(_shema))
                TableName = String.Format("\"{0}\".\"{1}\"", _shema, TableName);
            else
                TableName = String.Format("\"{0}\"", TableName);

            return TableName;
        }

        public static string GetSerializationNamespace()
        {
            string s_serializationNamespace = @"http://schemas.nauck-it.de/PostgreSQLProvider/1.0/";

            string var = string.Empty;
            var = WebConfigurationManager.AppSettings["SerializationNamespace"];

            if (!string.IsNullOrEmpty(var))
                s_serializationNamespace = var;

            return s_serializationNamespace;
        }
    }
}
